import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set from '@dfeidao/atom-web/local/set';
import fire from '@dfeidao/atom-web/msg/fire';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import set_nodes_cls from '@dfeidao/atom-web/ui/set-nodes-cls';
export default async function a001(fd: IFeidaoAiBrowserComponent, e: Event) {
	const n = e.target as HTMLDivElement;
	const v = n.getAttribute('data-v')
	const p = e.target as HTMLDivElement;
	const name = p.getAttribute('data-n')
	set(fd, "plan_cla_attr_name", name)
	set(fd, "plan_cla_attr_no", v)
	fire("zj-000001", 'a003')
	console.log("a001", e.currentTarget, e.target);
	const d = e.currentTarget as HTMLDivElement;//渲染后数据
	const nodes = fd.data.node.querySelectorAll('[data-name="hidden"]');
	const ns = Array.from(nodes) as HTMLDivElement[];//转换成数组类型
	set_nodes_cls(ns, 'w-bg-themef', false);
	set_node_cls(d, 'w-bg-themef', true);


}
